<template>
  <div class="name_list">
    <div class="item" v-for="item in list" :key="item.id">
      <div class="title">
        {{ item.title }}
      </div>
      <div class="check_text">点击查看</div>
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent, onMounted, reactive, ref, toRef, toRefs } from "vue";
import { openUrl } from "@/utils/isOpenWebUrl";

import { useRouter } from "vue-router";
export default defineComponent({
  name: "NameList",
  props: {
    list: {
      type: Array,
      default: () => [],
    },
  },
  setup() {
    const state = reactive({});
    const router = useRouter();
    const handNav = (item: any) => {
      openUrl(item, router);
    };
    return { ...toRefs(state), handNav };
  },
});
</script>
<style lang="scss" scoped>
.name_list {
  .item {
    display: flex;
    justify-content: space-between;
    align-content: center;
    margin-bottom: 25px;
    &:last-child {
      margin-bottom: 0;
    }
    .title {
      font-size: 16px;
      color: #303030;
    }
    .check_text {
      color: $themeColor;
      font-size: 14px;
    }
  }
}
</style>
